#include<stdio.h>
#include<string.h>
#include<unistd.h>
#define FILE_SIZE 1024
extern FILE* stdout;
int main()
{
    FILE* fp = fopen("bite", "w");
    if(fp == NULL)
    {
        perror("fopen");
        return 1;
    }
    char str[FILE_SIZE] = {"linux so easy!\n"};
    fwrite(str, strlen(str), 1, fp);
    fclose(fp);
    FILE* fp1 = fopen("bite", "r");
    if(fp1 == NULL)
    {
        perror("fopen");
        return 2;
    }
    char str1[FILE_SIZE] = {0};
    fread(str1, sizeof(str1), 1, fp1);
    fwrite(str1, strlen(str1), 1, stdout);
    fclose(fp1);
    return 0;
}
